﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace AssignmentsManage.Windows
{
    /// <summary>
    /// Interaction logic for CommentsWindow.xaml
    /// </summary>
    public partial class CommentsWindow : Window
    {
        public CommentsWindow()
        {
            InitializeComponent();
        }

        private void btnOK_Click(object sender, RoutedEventArgs e)
        {
            this.DialogResult = true;
            this.Close();
        }

        private void txtComments_TextChanged(object sender, TextChangedEventArgs e)
        {
            int selStart = txtComments.SelectionStart;
            int selLength = txtComments.SelectionLength;
            txtComments.Text = txtComments.Text.Replace(">", "").Replace("<", "");
            txtComments.SelectionStart = selStart;
            txtComments.SelectionLength = selLength;
        }
    }
}
